import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class MenuIcon extends StatelessWidget {
  final VoidCallback? onTap;
  final Widget? icon;
  final String? title;

  MenuIcon({
    Key? key,
    this.onTap,
    this.icon,
    this.title,
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        if (onTap != null) {
          onTap!();
        }
      },
      child: Column(
        children: [
          icon!,
          Container(
            padding: EdgeInsets.only(top: 12.h),
            child: Text(
              title!,
              style: TextStyle(
                color: Color(0xFF333333),
                fontSize: 24.sp,
                fontWeight: FontWeight.w400,
              ),
            ),
          )
        ],
      ),
    );
  }
}
